<script setup lang="ts">
import { ref } from 'vue';
import Son from './components/son.vue'
const money = ref(100) 
const car = ref('小黄车')
const age = ref(20)
// const subMoneyFn = (num: number) => {
//   console.log(num);
//   money.value = num
// }

</script>

<template>
  <h1>我是父组件  -- {{ money }} -- {{ car }} -- {{ age }}</h1>
  <hr>
  <input type="text" v-model="age">
  <!-- :value="age" @input="age = $event."  -->
  <!-- <Son :money="money" @subMoney="subMoneyFn"></Son> -->

  <!-- v-model="age" ===  v-model:modelValue="age" -->
  <Son v-model:money="money" v-model:car="car"  v-model:modelValue="age"></Son>
</template>

<style scoped lang="less">
</style>